<%@ page language="java" import="java.util.*,com.anhry.app.safety.util.Util" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>信息修改</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">	
	<link href="<%=basePath+Util.SKIN%>/css/right.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/js/check_jquery.js"></script>
    <script src="<%=basePath%>/js/oa.js" type="text/javascript"></script>
    <script type="text/javascript">
		function deleFj(id,baseName){
			$.ajax({
			type:"POST",
			url:baseName+"/oa/oaMsg_deleFj.action?fjId="+id,
			success:function(data){
				if(data=="1"){
					document.getElementById("fj_"+id).style.display="none";
				}else{
					alert('删除失败！');
				}		  			
		    }
		});				
		}

		$(document).ready(function(){
		$("#addMore").click(function(){//附件添加
			var td = document.getElementById("more");	
			var br = document.createElement("br");
			var input = document.createElement("input");
			var button = document.createElement("input");			
			input.type = "file";
			input.name = "doc";
			input.size = "60";
			button.type = "button";
			button.value = "删除";	
			button.onclick = function(){
				td.removeChild(br);
				td.removeChild(input);
				td.removeChild(button);
			}			
			td.appendChild(br);
			td.appendChild(input);
			td.appendChild(button);	
		});
	});
	</SCRIPT>
  </head>
  
  <body>
        <div class="body-box">
		<div class="map">
			<div class="map_con">
				当前位置： 协同办公 &gt; 信息报送 &gt; 修改
			</div>
		</div>
		<div id="container">
		    <form name="newsForm" action="<%=basePath%>/oa/oaMsg_saveMsg.action?search=1&num=${num}&size=${size}&beginDate=${beginDate }&endDate=${endDate }&readStatus=${readStatus }&cGrade=${cGrade }&cDept=${cDept }&cUnit=${cUnit }&acceptTypeForwardId=${acceptTypeForwardId }&menuId=${menuId }" method="post" enctype="multipart/form-data">
		    	<input type="hidden" name="msg.id" value="${msg.id }">
		    	<table border="0" cellspacing="0" cellpadding="0"  width="100%" class="info_table">
					<tr>
						<td colspan="2" class="title_li">修改信息</td>
					</tr>
					<tr>
						<td class="title_td" width="12%">标题：</td>
						<td ><input name="msg.msgTitle" type="text" size="70%" id="bit1" value="${msg.msgTitle }"><span class="note4">*</span></td>
					</tr>
					<tr>
						<td class="title_td">附件：</td>
						<td id="more"><input type="button" name="am1" value="添加附件" id="addMore" class="link_input"/> 
							<s:fielderror fieldName="suError" theme="simple"></s:fielderror>
							<s:if test="%{msgFjList.size>0}">
								<br/>
								<s:iterator id="fj" value="msgFjList">
								 	<span id="fj_${fj.id}">${fj.fjTitle}&nbsp;&nbsp;
								 	<!-- <a href="javascript:editFj('${fj.id }','<%=basePath%>')">修改</a>&nbsp;&nbsp; -->
								 	<a href="javascript:deleFj('${fj.id }','<%=basePath%>')">删除</a><br/></span>
								</s:iterator>
						</s:if>
						</td>
					</tr>
					<tr>	
						<td class="title_td">内容：</td>
						<td >
							<textarea name="newsContent" style="display:none">${newsContent}</textarea>
							<iframe id="eWebEditor1" src="<%=Util.EDITOR_BASE_URL %>/ewebeditor/ewebeditor.htm?id=newsContent&style=standard600&skin=office2003" frameborder="0" scrolling="no" width="600" height="350"></iframe> 
						</td>
					</tr>		
				</table>
				<table border="0" cellspacing="0" cellpadding="0"  width="100%" style="float:left; padding-top:15px;padding-bottom:5px;">
					<tr>
						<td align="center">
							<s:if test="%{msg.editStatus  == 0}">
								<input type="submit" class="link_input" value="保 存"/>
								<s:if test="menuId == 1">
									<input type="button" class="link_input" value="提 交" onclick="window.location.href='<%=basePath%>/oa/oaMsg_issue.action?searchType=${searchType }&id=${msg.id }&key=${key}&num=${num}&size=${size}&beginDate=${beginDate }&endDate=${endDate }&readStatus=${readStatus }&cGrade=${cGrade }&cDept=${cDept }&cUnit=${cUnit }&acceptTypeForwardId=${acceptTypeForwardId }&menuId=${menuId }'"/>
								</s:if>
							</s:if>
							<s:else>
								<input type="button" class="link_input" value="信息已上报" disabled="disabled" />
							</s:else>
							<input type="button" class="link_input" value="返 回" onclick="window.location.href='<%=basePath%>/oa/oaMsg_msgList.action?key=${key}&num=${num}&size=${size}&beginDate=${beginDate }&endDate=${endDate }&readStatus=${readStatus }&cGrade=${cGrade }&cDept=${cDept }&cUnit=${cUnit }&acceptTypeForwardId=${acceptTypeForwardId }&menuId=${menuId }&searchType=${searchType }'"/>
						</td>
					</tr>
				</table>
				<input type="hidden" name="keyWord" value="${keyWord }"/>
				<input type="hidden" name="tableType" value="${tableType }"/>
				<input type="hidden" name="num" value="${num }"/>
				<input type="hidden" name="size" value="${size }"/>
				<input type="hidden" name="key" value="${key }"/>
				<input type="hidden" name="searchType" value="${searchType }" />
		    </form>
	 </div>
	  </div>
  </body>
</html>
